const Sequelize = require('sequelize');
const baseModel = require('../baseModel');

class wechat extends baseModel{
  constructor(){
    super('wechat',{
      id:{
        type: Sequelize.INTEGER,
        allowNull: false,
        primaryKey:true
      },
      openid:{
        type: Sequelize.STRING(64),
        allowNull: false,
        primaryKey:true
      },
      createdAt: {
        type: Sequelize.DATE,
        allowNull: false
      }
    });
    this.model = super.getModel();
    this.model.sync();
  }
}

module.exports = new wechat();
